home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir28 / st-size.zip / SIZE.DOC < prev    next >
Text File  |  1992-12-01  |  42KB  |  992 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                              PC-SIZE: Consultant
  9.                    A Program for Sample Size Determinations
  10.                                  Version 1.01
  11.                                    (c) 1990
  12.  
  13.                         "One of many STATOOLS(tm)..."
  14.                                       by
  15.  
  16.                                Gerard E. Dallal
  17.                               54 High Plain Road
  18.                               Andover, MA  01810
  19.  
  20.  
  21.             PC-SIZE:   Consultant  is  a prompt  driven  program  that
  22.         calculates  the  sample   size  requirements  for   confidence
  23.         intervals and  tests  of  significance.  When  constructing  a
  24.         confidence interval for  a single population  mean or for  the
  25.         difference between two population  means based on  independent
  26.         samples, PC-SIZE  calculates  the  sample  size  necessary  to
  27.         insure with  a prespecified  amount  of probability  that  the
  28.         interval does not  exceed a  specified length.   For tests  of
  29.         significance, PC-SIZE  calculates the  sample size  needed  to
  30.         achieve a specified amount of  power and calculates the  power
  31.         of specific sample  sizes for  three experimental  situations:
  32.         comparing the means of two independent samples, comparing  the
  33.         means  of  paired  data,  and  comparing  proportions  in  two
  34.         independent samples.
  35.  
  36.  
  37.                        Why obtain sample size estimates?
  38.  
  39.             Observations  cost  time,  money,  and  manpower.  It   is
  40.         wasteful to collect more data than necessary.  It is even more
  41.         wasteful to undertake a  study where sample size  calculations
  42.         would have  revealed the  impossibility of  collecting  enough
  43.         data to answer the research question.
  44.  
  45.  
  46.  
  47.                                     NOTICE
  48.  
  49.             Documentation  and   original  code   copyright  1989   by
  50.         Gerard E. Dallal.  Please  acknowledge PC-SIZE: Consultant  in
  51.         any manuscript that uses its calculations.
  52.  
  53.  
  54.  
  55.                                   DISCLAIMER
  56.  
  57.             STATOOLS are  provided "as  is"  without warranty  of  any
  58.         kind.  The  entire risk  as to the  quality, performance,  and
  59.         fitness  for  intended  purpose  is  with  you.    You  assume
  60.         responsibility for the  selection of the  program and for  the
  61.         use of results obtained from that program.
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                                                 PAGE 2
  68.  
  69.  
  70.  
  71.                               TABLE OF CONTENTS
  72.  
  73.         Background.................................................  2
  74.         Introduction...............................................  3
  75.         Operation..................................................  4
  76.             Confidence Intervals...................................  5
  77.             Tests of Significance..................................  6
  78.                 Independent samples................................  6
  79.                     Unequal sample sizes...........................  7
  80.                 Paired data........................................  7
  81.                 Proportions........................................  8
  82.         Power of specific sample sizes.............................  9
  83.         Reports....................................................  9
  84.         Technical details..........................................  9
  85.             Initial approximation--Confidence intervals............  9
  86.             Initial approximation--Tests of significance........... 10
  87.             Tests of relative differences in population means...... 10
  88.             Validation............................................. 11
  89.         Other applications: Tests of significance.................. 11
  90.             Two period cross-over design........................... 11
  91.             Comparing a single sample to a known standard.......... 11
  92.             Pre- to Post-treatment changes in two independent
  93.                samples............................................. 11
  94.         Other issues............................................... 13
  95.             Simplifying the experiment............................. 13
  96.             Repeated measurements over time........................ 13
  97.             Two-tailed tests....................................... 13
  98.         Algorithms................................................. 14
  99.         References................................................. 15
  100.         Duplication and shareware notices.......................... 16
  101.         Registration form.......................................... 16
  102.  
  103.  
  104.  
  105.                                   BACKGROUND
  106.  
  107.             PC-SIZE, version 1.0, was written in 1985 to help with  my
  108.         work as a statistical consultant.  It saved me from having  to
  109.         perform sample size  calculations by  hand on  the spot  (with
  110.         potentially disastrous consequences  from a  slight slip)  and
  111.         enabled  me  to  avoid   breaks  in  continuity  from   ending
  112.         consulting sessions prematurely so that I could obtain  sample
  113.         size estimates in unpressured surroundings. PC-SIZE, then, was
  114.         written for someone  familiar with the  theory of sample  size
  115.         estimation who   needed a  way to carry  out the  calculations
  116.         quickly and reliably.  In 1986, PC-SIZE was made available  to
  117.         others  who  wanted  this  capability  at  their   fingertips.
  118.         (Dallal, 1986).
  119.  
  120.             The original PC-SIZE  proved to be  an effective  teaching
  121.  
  122.  
  123.         PC-SIZE                                            G.E. Dallal
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                 PAGE 3
  130.  
  131.  
  132.         tool.  Students were freed  from the burden of grappling  with
  133.         formulas and  carrying out  calculations by  hand, but  almost
  134.         immediately they began to  ask for a  program that   explained
  135.         itself in more detail.  That program is PC-SIZE:  Consultant.
  136.  
  137.             The estimates from PC-SIZE:   Consultant will be the  same
  138.         as those obtained from the original PC-SIZE, but the operation
  139.         of PC-SIZE: Consultant  should prove  more straightforward  to
  140.         the  casual  user.    Sample  size  calculations  can  now  be
  141.         performed not only by  professional statisticians but also  by
  142.         investigators who initiate the research.
  143.  
  144.  
  145.  
  146.                                  INTRODUCTION
  147.  
  148.             Welcome to PC-SIZE:  Consultant.  With  this program,  you
  149.         will be  able  to obtain  sample  size estimates  for  a  wide
  150.         variety of experimental situations.   No computer program  can
  151.         turn you  into  a  trained  statistician, but  if  a  task  is
  152.         sufficiently narrow and  well-defined (such  as calculating  a
  153.         sample size estimate) it is possible to duplicate what goes on
  154.         in a consulting session with a professional statistician.
  155.  
  156.             The most important rule for achieving a successful  result
  157.         is, "Be honest."   If  your experiment  is one  of those  that
  158.         PC-SIZE can handle, the program will  serve you well.  If  you
  159.         try too hard  to shoehorn  your study into  this program,  the
  160.         resulting estimates may have  no relevance to your  situation.
  161.         PC-SIZE is  no different  from any  other self-help  tool.  It
  162.         gives you the opportunity to  act without having an expert  on
  163.         hand, but it places on you the responsibility for knowing when
  164.         you are overextending yourself.  There are many fine books  on
  165.         medicine, home repairs, and auto mechanics, but the reader has
  166.         to know when it is time to put the book aside and call in  the
  167.         doctor, carpenter, electrician . . . or statistician.
  168.  
  169.             The second most important rule for achieving a  successful
  170.         result is, "Be honest."  You will be asked for your best guess
  171.         about many  aspects of  the  experiment you  are  considering.
  172.         Sample size estimates can change dramatically with the  values
  173.         you specify in response to the prompts.  Decrease the estimate
  174.         of the measurement error by  30%, for example, and the  sample
  175.         size estimate is cut in half.  It might seem tempting to  give
  176.         optimistic estimates so that the sample size requirement  will
  177.         be reduced  to manageable  numbers, but  the only  thing  such
  178.         estimates  accomplish  is  to  divert  valuable  resources  to
  179.         projects that should never have been undertaken.
  180.  
  181.             Your feedback is appreciated.   Please let me know if  the
  182.         documentation or program prompts contain any ambiguities or if
  183.  
  184.  
  185.         PC-SIZE                                            G.E. Dallal
  186.  
  187.  
  188.  
  189.  
  190.  
  191.                                                                 PAGE 4
  192.  
  193.  
  194.         there is anything that could  have been explained more  fully.
  195.         I do not expect to  broaden the scope of  the program , but  I
  196.         want PC-SIZE to excel at what it does.
  197.  
  198.  
  199.  
  200.                                    OPERATION
  201.  
  202.             PC-SIZE: Consultant  is  a  prompt driven  program.    Any
  203.         quantity that appears  in square brackets  is a default  value
  204.         that can be obtained by pressing the Enter key.
  205.  
  206.             PC-SIZE  gives  sample   size  estimates  for   confidence
  207.         intervals to be shorter than  a given length with a  specified
  208.         amount of probability.  The confidence intervals can be for  a
  209.         single population  mean  or  for the  difference  between  two
  210.         population means  based on  independent samples.    Confidence
  211.         intervals for  the  difference between  two  population  means
  212.         based on paired samples  can be obtained  by using the  single
  213.         mean option and answering the  prompts in terms of the  paired
  214.         differences.
  215.  
  216.             PC-SIZE gives  sample size  estimates and  performs  power
  217.         calculations for three hypothesis testing situations:
  218.  
  219.             1.  comparing means from two independent samples.  Samples
  220.         are independent when there is no special relationship  between
  221.         the experimental units in the two samples.
  222.  
  223.             2.  comparing  means  from  paired  samples.    In  paired
  224.         samples there  is  a  relationship  between  the  experimental
  225.         units.  Two measurements may  be made on the same  individual,
  226.         on twins, on siblings, or on spouses.
  227.  
  228.             3.  comparing  two  independent  proportions.    This   is
  229.         similar to situation  1, except that  the proportion of  units
  230.         possessing  a  particular  characteristic--for  example,   the
  231.         proportion  of   individuals   with  heart   disease--is   the
  232.         measurement of interest.
  233.  
  234.             These  few  situations  describe  the  vast  majority   of
  235.         scientific experiments.   Theorists have been  able to  derive
  236.         formulas for almost  any special situation  but, in  practice,
  237.         the less complicate formulas often serve us better.
  238.  
  239.             Consider,  for  example,  a  comparison  involving   three
  240.         treatments.   The hypothesis  of no  treatment differences  is
  241.         usually tested  by  using  analysis  of  variance  techniques.
  242.         There is a formula  that specifies the  sample size needed  to
  243.         test this hypothesis, but the numbers may not be adequate  for
  244.         a complete analysis of  the data.  The  sample size   estimate
  245.  
  246.  
  247.         PC-SIZE                                            G.E. Dallal
  248.  
  249.  
  250.  
  251.  
  252.  
  253.                                                                 PAGE 5
  254.  
  255.  
  256.         says how many  subjects are  needed to  achieve a  significant
  257.         result when  testing  whether  the  three  samples  come  from
  258.         populations with equal means, but  the sample size may be  too
  259.         small for determining the specific differences among the three
  260.         groups.
  261.  
  262.             Suppose 3  treatment  groups  are expected  to  have  mean
  263.         responses of  A=1.0, B=2.0,  and C=2.5,  with a  within  group
  264.         standard deviation  of  1.0 .   The  sample size  formula  for
  265.         analysis of variance says that the experiment must include  10
  266.         individuals per group  to have an  80% chance of  establishing
  267.         that the  means of  the three  groups are  not all  equal.   A
  268.         sample  size  of  10  per   group  gives  an  88%  chance   of
  269.         establishing that A and C  have different means, but it  gives
  270.         only a 56% chance of establishing  that A and B are  different
  271.         and a 19% chance of establishing  that B and C are  different.
  272.         If the difference between B and C is the main reasons for  the
  273.         study, a sample size  of 10 per  group is much  too small.   A
  274.         sample size of 64 per group would be more appropriate.
  275.  
  276.  
  277.  
  278.                              CONFIDENCE INTERVALS
  279.  
  280.             The  sample  size  needed  to  insure  that  a  confidence
  281.         interval will be no longer  than a prespecified value  depends
  282.         on 4 quantities:
  283.  
  284.             1.  The amount of confidence in  the interval.  All  other
  285.         things being equal, more observations are needed to produce an
  286.         interval of greater confidence.
  287.  
  288.             2.  The length of  the interval.   All other things  being
  289.         equal, more  observations  are  needed to  produce  a  shorter
  290.         interval.
  291.  
  292.             3.  The probability that the interval does not exceed  the
  293.         specified length.   More observations are  needed to  increase
  294.         the  probability  that  the  interval  does  not  exceed   the
  295.         specified bound.
  296.  
  297.             4.  The variability in the  individual observations.   All
  298.         other things being equal, the  greater the variability in  the
  299.         data, the more observations needed.
  300.  
  301.             Variability  may  be  specified   as  either  a   standard
  302.         deviation  or  as  an  interval  that  contains  a   specified
  303.         percentage of  the  data.     Most sample  size  formulas  are
  304.         written in terms  of the standard  deviation, but  researchers
  305.         are  often  uncomfortable   estimating  standard   deviations.
  306.         Investigators usually find it easier  to specify the width  of
  307.  
  308.  
  309.         PC-SIZE                                            G.E. Dallal
  310.  
  311.  
  312.  
  313.  
  314.  
  315.                                                                 PAGE 6
  316.  
  317.  
  318.         an interval that is likely to contain most of the data.
  319.  
  320.             PC-SIZE asks  for  the  percentage  of  the  data  in  the
  321.         interval and then for the width of the interval.  PC-SIZE then
  322.         computes the normal percentile  z that contains the  specified
  323.         probability between  -z and  +z.   The standard  deviation  is
  324.         estimated as  the width  divided by  2*z since,  for  normally
  325.         distributed data,  the  specified percentage  of  observations
  326.         will be within z standard deviations of the population mean.
  327.  
  328.  
  329.                              TESTS OF SIGNIFICANCE
  330.  
  331.                               Independent Samples
  332.  
  333.             The sample size estimate depends on 4 quantities:
  334.  
  335.             1.  the level  at  which  the  null  hypothesis  of  equal
  336.         population means will be  tested.  This  is typically 0.05  or
  337.         0.01.  The level of the test is the probability of reporting a
  338.         difference if there is  really none.   All other things  being
  339.         equal, more observations are needed to reduce the  probability
  340.         of making such an error.
  341.  
  342.             2.  the likely  difference between  the means  of the  two
  343.         populations from which the samples are drawn.  The smaller the
  344.         difference, the larger the sample size needed to establish the
  345.         difference.
  346.  
  347.             The  likely  difference  between  the  means  of  the  two
  348.         populations  may  be  specified   in  absolute  units   (e.g.,
  349.         10 mg/dl,  43 days)  or  as  a  percent  change.    When   the
  350.         difference is in absolute units, PC-SIZE: Consultant gives the
  351.         option of specifying the individual means or their difference.
  352.  
  353.             Note:  The sample size estimate depends on the sign of the
  354.         percent difference.  A difference  of -6%, for example,  gives
  355.         slightly different  results from  a difference  of +6%.    The
  356.         reason is  that if  the larger  mean is  6% greater  than  the
  357.         smaller, then the smaller mean  is 5.7% less than the  larger,
  358.         not 6% less.
  359.  
  360.             3.  measurement error,  the  inherent variability  in  the
  361.         measurement process.   The larger the  measurement error,  the
  362.         larger the sample size needed to establish a given  difference
  363.         in means.
  364.  
  365.             Measurement error may  be specified as  either a  standard
  366.         deviation or an interval that contains a specified  percentage
  367.         of the data.   Most sample size formulas are written in  terms
  368.         of  the  standard   deviation,  but   researchers  are   often
  369.  
  370.  
  371.         PC-SIZE                                            G.E. Dallal
  372.  
  373.  
  374.  
  375.  
  376.  
  377.                                                                 PAGE 7
  378.  
  379.  
  380.         uncomfortable estimating standard deviations.
  381.  
  382.             PC-SIZE asks  for  the  percentage  of  the  data  in  the
  383.         interval and then for the width of the interval.  PC-SIZE then
  384.         computes the normal percentile  z that contains the  specified
  385.         probability between  -z and  +z.   The standard  deviation  is
  386.         estimated as  the width  divided by  2*z since,  for  normally
  387.         distributed data,  the  specified percentage  of  observations
  388.         will be within z standard deviations of the population mean.
  389.  
  390.             4.  power, the  probability  of  detecting  the  specified
  391.         difference.   The  larger the  sample  size, the  greater  the
  392.         probability of  establishing a  given  difference.   The  most
  393.         commonly used value is 80%.  Values less than 80% are  usually
  394.         judged too  small  to  justify the  cost  of  the  experiment.
  395.         Probabilities larger than  80% are  nice, of  course, but  may
  396.         result in a prohibitively large or costly experiment.
  397.  
  398.         Unequal sample sizes
  399.  
  400.             PC-SIZE allows the user to specify the ratio of the sample
  401.         sizes, sample  1 to  sample  2.   Calculations are  driven  by
  402.         sample 1.  The estimate for the second sample size is obtained
  403.         by dividing the first sample  size by the specified ratio  and
  404.         reporting the smallest integer no less than this value.   This
  405.         procedure can lead  to situations where  the estimated  sample
  406.         sizes are  not  precisely in  the  specified ratio  and  where
  407.         inverting the ratio will produce slightly different estimates.
  408.         For example, with  a difference  of 3,  within group  standard
  409.         deviation of 4.7, level of test 0.05, and power at alternative
  410.         0.90:
  411.  
  412.                    Ratio          Sample Sizes        Power
  413.                     2.50             91, 37          .90125
  414.                     0.40             37, 93          .90307
  415.  
  416.  
  417.                                   Paired Data
  418.  
  419.             PC-SIZE asks for the  expected difference and an  estimate
  420.         of the variability  OF THE  DIFFERENCES.   Variability may  be
  421.         specified as a standard  deviation (The standard deviation  of
  422.         the differences is  also known  as the standard  error of  the
  423.         difference)  or  as  an   interval  containing  most  of   the
  424.         differences.
  425.  
  426.             Often, a researcher will have some idea of the variability
  427.         of the individual responses but  not of their difference.   If
  428.         the correlation between  the two responses  can be  estimated,
  429.         the variance (the  square of  the standard  deviation) of  the
  430.         differences can be obtained by using the formula
  431.  
  432.  
  433.         PC-SIZE                                            G.E. Dallal
  434.  
  435.  
  436.  
  437.  
  438.  
  439.                                                                 PAGE 8
  440.  
  441.  
  442.                  var(X-Y) = var(X) + var(Y)
  443.                                - 2 * corr(X,Y) * sd(X) * sd(Y) ,
  444.  
  445.         where var(X) is the  variance of X and  sd(X) is the  standard
  446.         deviation.  If the variances  of the two responses are  equal,
  447.         the relation reduces to
  448.  
  449.                   sd(X-Y) = sd(X) * SQRT{2 * (1 - corr(X,Y))} .
  450.  
  451.         Thus, if the correlation between the two measurements is  0.5,
  452.         the standard deviation of the differences will be equal to the
  453.         standard deviation of the individual measurements.
  454.  
  455.  
  456.  
  457.                                  Proportions
  458.  
  459.             PC-SIZE uses formulas  3.18 and 3.19  of Fleiss (1981)  to
  460.         determine the sample size  for a test of  the equality of  two
  461.         proportions.  (Note:  The formulas and table in Fleiss  (1981)
  462.         differ substantially  from those  in Fleiss  (1973).)     This
  463.         estimate is  a large  sample approximation  based on  standard
  464.         normal theory.   The user is  prompted for the  values of  the
  465.         proportions under the alternative to equality.
  466.  
  467.             Equal sample sizes: In some instances the values  produced
  468.         by PC-SIZE will be 1 greater than those in Fleiss's Table A.3.
  469.         Fleiss  has  apparently  taken  the  values  produced  by  the
  470.         formulas and rounded to the nearest integer.  PC-SIZE  reports
  471.         the  smallest  integer  not  less  than  the  results  of  the
  472.         formulas.
  473.  
  474.             Unequal sample sizes: The user specifies the ratio of  the
  475.         sample sizes, sample 1 to  sample 2.  Calculations are  driven
  476.         by sample 1.   The estimate for sample  size 2 is obtained  by
  477.         dividing sample 1's size by the specified ratio and  reporting
  478.         the smallest integer no less than this value.  This  procedure
  479.         can lead to  situations where the  estimated sample sizes  are
  480.         not precisely in the specified  ratio and where switching  the
  481.         samples' labels and inverting the ratio will produce  slightly
  482.         different estimates.  For example, (cf.  Fleiss, 1981,  p. 45)
  483.         size of test 0.01, power at alternative 0.95:
  484.  
  485.                  P1      P2    Ratio(1:2)  Group 1     Group 2
  486.                0.25     0.40      2.00       531         266
  487.                0.40     0.25      0.50       266         532
  488.  
  489.         Use sample sizes consistent with the specified ratio that  are
  490.         no less than the estimates produced by PC-SIZE.
  491.  
  492.  
  493.  
  494.  
  495.         PC-SIZE                                            G.E. Dallal
  496.  
  497.  
  498.  
  499.  
  500.  
  501.                                                                 PAGE 9
  502.  
  503.  
  504.                         POWER OF SPECIFIC SAMPLE SIZES
  505.  
  506.             PC-SIZE can calculate the power of specific sample  sizes.
  507.         The  alternative  to  equality  of  means  or  proportions  is
  508.         specified in the same way as when estimating a sample size.  A
  509.         starting value, final value, and  an increment of the group  1
  510.         sample size must be  specified, as well.   For example,  power
  511.         can be calculated  for group  1 sample sizes  of 40  to 60  in
  512.         increments of 5.
  513.  
  514.             If the starting and final values differ by no more than 1,
  515.         no increment will  be requested since  it must be  1.  If  the
  516.         starting and  final values  of  the group  1 sample  size  are
  517.         equal, the next prompt asks for the group 2 sample size itself
  518.         rather than the ratio of the  sample sizes, to make it  easier
  519.         to perform power calculations for published data.
  520.  
  521.  
  522.  
  523.                                     REPORTS
  524.  
  525.             PC-SIZE: Consultant generates reports of its  calculations
  526.         in a form suitable for inclusion in manuscripts and proposals.
  527.         The report can be printed on screen or in an ASCII text  file.
  528.         Whenever reports are placed in  a file, they are also  printed
  529.         on screen.   The name  of the  output file  cannot be  changed
  530.         during a PC-SIZE session.
  531.  
  532.             Reports of power calculations  contain only the power  for
  533.         the last sample size requested.
  534.  
  535.  
  536.  
  537.                                TECHNICAL DETAILS
  538.  
  539.             PC-SIZE:  Consultant  is  written  in  Microsoft   FORTRAN
  540.         version 5.0.  The program  was compiled with all  optimization
  541.         turned off.  Double precision arithmetic is used throughout.
  542.  
  543.  
  544.                   Initial Approximation--Confidence Intervals
  545.  
  546.             PC-SIZE uses the usual large sample approximation for  the
  547.         sample size for  intervals whose expected  length is close  to
  548.         the  specified  upper  bound,  namely  (s*z/w)**2  for  single
  549.         population means and 2*(s*z/w)**2  for the difference  between
  550.         two population means based on independent samples, where s  is
  551.         the (common)  population standard  deviation, w  is the  half-
  552.         width (length/2) of  the interval,  and z  is the  appropriate
  553.         percentile  of  the   standard  normal   distribution.     The
  554.         probability that the length of  the interval is less than  the
  555.  
  556.  
  557.         PC-SIZE                                            G.E. Dallal
  558.  
  559.  
  560.  
  561.  
  562.  
  563.                                                                PAGE 10
  564.  
  565.  
  566.         specified  upper  bound is calculated  at this initial  sample
  567.         size, truncated to the nearest  multiple of 10 if the  initial
  568.         estimate exceeds 1000, and for successive increments until the
  569.         required probability is achieved.  The increments are 1  below
  570.         sample sizes of 1,000, 2 below 5,000, 5 below 10,000, and  20,
  571.         otherwise.   The  probabilities  are  obtained  by  using  the
  572.         inequalities preceeding expressions (7) and (9) in Kupper  and
  573.         Hafner for sample sizes  less than 500.   For sample sizes  of
  574.         500 or  more, the  F(1,n-1)  and F(1,2n-2)  distributions  are
  575.         replaced by  the  chi-square  distribution with  1  degree  of
  576.         freedom.
  577.  
  578.  
  579.                  Initial Approximation--Tests of Significance
  580.  
  581.             PC-SIZE invokes a  "large sample  approximation" (using  a
  582.         non-central chi-square  distribution  in  place  of  the  non-
  583.         central F) to get a rough estimate the necessary sample  size.
  584.         If the large sample estimate is 500 or more, only the smallest
  585.         integer no less  than this estimate  is reported.   Otherwise,
  586.         the non-central F  distribution is  used to  obtain the  exact
  587.         sample size estimate.  Calculations  start at 1 less than  the
  588.         integer part of the large sample approximation and continue at
  589.         increments of 1 until the required power is achieved.
  590.  
  591.             Proportions are handled differently; only the large sample
  592.         approximation is used, as described above under "Proportions."
  593.  
  594.  
  595.                 Tests of Significance for Relative Differences
  596.  
  597.             PC-SIZE will calculate the  sample size for comparing  two
  598.         population means that differ by a relative percent rather than
  599.         by an  absolute  amount.   The  within  group  variability  is
  600.         specified as a percentage of the population mean.
  601.  
  602.             The delta  method  is applied  to  the logarithms  of  the
  603.         measurements so  that  the  usual  calculations  for  absolute
  604.         differences can  be applied  to  the logs.    If one  mean  is
  605.         (100*(1+e))-% of the other mean and each population's standard
  606.         deviation  is  (100*d)-%  of  its  mean,  then  the   expected
  607.         difference of the natural  logs is approximately log(1+e)  and
  608.         the common within group standard deviation of the logs is 'd'.
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.         PC-SIZE                                            G.E. Dallal
  620.  
  621.  
  622.  
  623.  
  624.  
  625.                                                                PAGE 11
  626.  
  627.  
  628.                                   Validation
  629.  
  630.             PC-SIZE: Consultant has been  checked against a  selection
  631.         of entries form tables 2.3.4, 2.3.5, 2.3.6, and 2.4.1 of Cohen
  632.         (1977) and table A.3 of Fleiss  (1981).   No differences  have
  633.         been  observed  except   for  those   already  mentioned   for
  634.         proportions where Fleiss appears  to round fractional  results
  635.         while PC-SIZE reports the next largest integer.
  636.  
  637.  
  638.  
  639.                   OTHER APPLICATIONS:  Tests of Significance
  640.  
  641.                          Two period cross-over design
  642.  
  643.             The two  period  cross-over design  can  be treated  as  a
  644.         paired t-test with one fewer error degrees of freedom than for
  645.         the  paired  t-test  based  on   the  same  total  number   of
  646.         observations.  Proceed  as for  a paired  t-test, obtaining  a
  647.         sample size of 'n'.  For each sequence (AB, BA), take  (n+1)/2
  648.         observations if 'n' is odd, 1+n/2 if n is even.
  649.  
  650.  
  651.                 Comparing a Single Sample to a Known Standard
  652.  
  653.             The mean of a single sample can be compared to a specified
  654.         constant by using the paired  t-test mode.  Set the  "expected
  655.         difference" to  the expected  difference between  the  unknown
  656.         population mean and the known standard.  Set the "estimate  of
  657.         standard deviation of difference" to the estimated  population
  658.         standard deviation.
  659.  
  660.  
  661.                                    Comparing
  662.                         Pre- to Post-treatment Changes
  663.                            In Two Independent Groups
  664.  
  665.             PC-SIZE can be  used to compute  sample size  requirements
  666.         for pre- and post-treatment comparisons between two  regimens,
  667.         where each subject receives only one regimen.  This example is
  668.         of  particular   interest   because  it   involves   comparing
  669.         differences between differences, that  is, the most  important
  670.         comparison is  usually  the difference  between  the  pre/post
  671.         differences for the two regimens.
  672.  
  673.             Suppose one regimen is an active agent (treatment) and the
  674.         other is  a  placebo  control  (control).    There  are  three
  675.         questions that might be asked:
  676.  
  677.             1.  Does the treatment group change over time?
  678.  
  679.  
  680.  
  681.         PC-SIZE                                            G.E. Dallal
  682.  
  683.  
  684.  
  685.  
  686.  
  687.                                                                PAGE 12
  688.  
  689.  
  690.             2.  Does the control group change over time?
  691.  
  692.             3.  Are the changes  in the treatment  and control  groups
  693.         the same?
  694.  
  695.             The sample sizes needed to answer questions 1 and 2 can be
  696.         obtained by using PC-SIZE for  paired samples.  The pairs  (or
  697.         differences) are the pre- and post-treatment measurements  (or
  698.         their  difference) made on the  same individual.  To obtain  a
  699.         sample size estimate, it is necessary to provide best  guesses
  700.         of the  likely  pre-  to post-treatment  changes  and  of  the
  701.         standard deviation of the changes.
  702.  
  703.             Question 3 asks about the difference between the  pre/post
  704.         changes (or the difference between the differences!).  It is a
  705.         question about independent samples in which the responses  are
  706.         differences between the pre- and post-treatment measurements.
  707.  
  708.             Example:   Does  vitamin  C  supplementation  affect  high
  709.         density lipoprotein (HDL) levels?
  710.  
  711.             Suppose the tests are to be carried out at the 0.05  level
  712.         of significance, 80-% power is required, and the best  guesses
  713.         about likely  changes  in  HDL  levels  are  2 mg/dl  for  the
  714.         controls (due to  heightened awareness  from participation  in
  715.         the study) and 6 mg/dl  for those given  vitamin C.   Suppose,
  716.         the standard deviation for a single HDL measurement made on  a
  717.         cross-section of individuals is known to be about 8 mg/dl  and
  718.         the correlation between pre- and post treatment HDL levels  is
  719.         expected to be around  0.70.  Then  the standard deviation  of
  720.         the differences is expected to be about
  721.  
  722.                       6.2 = [ 8 * SQRT(2 * (1 - 0.70)) ]  .
  723.  
  724.             To determine whether the control group changes over  time,
  725.         the paired t test portion of PC-SIZE is used with an estimated
  726.         effect of  2 and  an estimated  standard deviation  of 6.2  to
  727.         obtain a  sample size  estimate of  78 control  subjects.   To
  728.         determine whether the vitamin C  group changes over time,  the
  729.         paired t test  portion of  PC-SIZE is used  with an  estimated
  730.         effect of  6 and  an estimated  standard deviation  of 6.2  to
  731.         obtain a sample size  estimate of 11 vitamin  C subjects.   To
  732.         determine whether the vitamin C and control groups differ, the
  733.         independent samples portion of PC-SIZE is used with  estimated
  734.         means of 2 and 6 (or, equivalently, a difference of 4) and  an
  735.         estimated standard deviation  of 6.2 to  obtain a sample  size
  736.         estimate of  39  per  group.     Unless  it  is  important  to
  737.         establish the  change  in the  control  group over  time,  the
  738.         experiment would be carried out with 39 subjects per group.
  739.  
  740.  
  741.  
  742.  
  743.         PC-SIZE                                            G.E. Dallal
  744.  
  745.  
  746.  
  747.  
  748.  
  749.                                                                PAGE 13
  750.  
  751.  
  752.                                  OTHER ISSUES
  753.  
  754.         Simplifying the Experiment
  755.  
  756.             A useful approach to sample  size estimation is to  reduce
  757.         an experiment to the more important two group comparisons  and
  758.         use  the  largest  sample  size  required  by  these  critical
  759.         comparisons as the common sample size for all groups.  In this
  760.         way, there will be  a good chance of  a successful outcome  if
  761.         your estimates are correct.   This method often uncovers  ways
  762.         in which time and resources  can be saved--by eliminating sets
  763.         of treatments and  conditions that, upon  reflection, are  not
  764.         essential to the research.
  765.  
  766.         Repeated Measurements Over Time
  767.  
  768.             Many experiments involve measuring individuals'  responses
  769.         over time.  Sample size estimation can be carried out in terms
  770.         of the summaries of  the responses that  will be subjected  to
  771.         analysis.  Examples of such summaries are time to peak, number
  772.         of peaks, average response, and area under the curve.
  773.  
  774.         Two-Tailed Tests
  775.  
  776.             PC-SIZE treats all tests for equality of population  means
  777.         and proportions as two-tailed tests, that is, it assumes  that
  778.         the null hypothesis of equality will be rejected regardless of
  779.         which sample has the greater mean or proportion.  No provision
  780.         is made for one-tailed tests, where the hypothesis of equality
  781.         is rejected only if one particular group has the greater  mean
  782.         or proportion.
  783.  
  784.             One-tailed tests  are inherently  unsound.   There are  no
  785.         situations where  differences in  a particular  direction  are
  786.         uninteresting.  The usual example given to justify the use  of
  787.         one-tailed tests is that  of comparing a  new treatment to  an
  788.         established treatment.   The  test should  be one-tailed,  the
  789.         argument goes, because  the only  way the  new treatment  will
  790.         displace the standard  treatment is  if the  new treatment  is
  791.         shown to be better; significant results favoring the  standard
  792.         treatment do  not  matter.    The reasoning  is  flawed.    We
  793.         certainly  want  to  know   if  the  new  treatment   performs
  794.         significantly worse than  the standard treatment,  if only  to
  795.         ask why the new treatment was proposed in the first place.
  796.  
  797.             To  answer  this  criticism  of  one-tailed  tests,   some
  798.         analysts have proposed the use of unbalanced two-tailed tests,
  799.         tests for which  the rejection of  equality of means  requires
  800.         greater differences in one direction than the other.  (In  the
  801.         precious example, an 0.05 level test might be constructed from
  802.         outcomes that  have a  probability of  0.04 favoring  the  new
  803.  
  804.  
  805.         PC-SIZE                                            G.E. Dallal
  806.  
  807.  
  808.  
  809.  
  810.  
  811.                                                                PAGE 14
  812.  
  813.  
  814.         treatment and  0.01 favoring  the  standard treatment.)    But
  815.         because  there  is  no   standard  method  for  choosing   the
  816.         probabilities, analysts have stayed with the usual  two-tailed
  817.         test which assigns the same probability to each tail.
  818.  
  819.  
  820.  
  821.                                   ALGORITHMS
  822.  
  823.             PC-SIZE makes  use of  the following  published  routines,
  824.         modified to run in double precision:
  825.  
  826.         Best DJ  and  Roberts DE  (1975),   "Algorithm  AS 91.     The
  827.            Percentage  Points   of  the   Chi-squared   Distribution,"
  828.            Applied Statistics, 24, 385-388.
  829.  
  830.         Bhattacharjee GP (1970),  "Algorithm  AS 32.   The  Incomplete
  831.            Gamma Integral," Applied Statistics, 19, 285-287.
  832.  
  833.         Cran GW, Martin KJ and  Thomas GE (1977),  "Remark AS R19  and
  834.            Algorithm AS 109.    A  Remark On  Algorithms  AS  63:  The
  835.            Incomplete  Beta  Integral,  and  AS  64:  Inverse  of  the
  836.            Incomplete Beta  Function Ratio,"  Applied Statistics,  26,
  837.            111-114.
  838.  
  839.         Hill ID (1973),  "Algorithm  AS 66.    The  normal  integral,"
  840.            Applied Statistics, 22, 424-427.
  841.  
  842.         Majumder KL and  Bhattacharjee GP  (1973),  "Algorithm  AS 63.
  843.            The Incomplete Beta Integral," Applied Statistics, 22, 409-
  844.            411.
  845.  
  846.         Odeh RE and Evans JO (1974), "Algorithm AS 70.  The Percentage
  847.            Points of the Normal Distribution," Applied Statistics, 23,
  848.            96-97.
  849.  
  850.  
  851.         and a FORTRAN translation of
  852.  
  853.         Pike MC and Hill ID  (1966), "Algorithm 291.  Logarithm of the
  854.            Gamma Function,"  Communications  of  the  Association  for
  855.            Computing Machinery, 9, 684.
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.         PC-SIZE                                            G.E. Dallal
  868.  
  869.  
  870.  
  871.  
  872.  
  873.                                                                PAGE 15
  874.  
  875.  
  876.                                   REFERENCES
  877.  
  878.         Cohen J (1977), Statistical Power Analysis for the  Behavioral
  879.            Sciences, revised edition.  New York:  Academic Press.
  880.  
  881.         Dallal GE  (1986),  "PC-SIZE:    A  Program  for   Sample-Size
  882.            Determinations,"  The American Statistician, 40, 52.
  883.  
  884.         Fleiss JL    (1973).    Statistical  Methods  for  Rates   and
  885.            Proportions.  New York: John Wiley & Sons, Inc.
  886.  
  887.         Fleiss JL    (1981).    Statistical  Methods  for  Rates   and
  888.            Proportions, 2-nd ed.  New York: John Wiley & Sons, Inc.
  889.  
  890.         Kupper LL and Hafner KB (1989),  "How Appropriate Are  Popular
  891.            Sample Size  Formulas?,"   The American  Statistician,  43,
  892.            101-105.
  893.  
  894.  
  895.  
  896.                                  UPDATE HISTORY
  897.  
  898.             Version 1.01  allows for  printing  of larger  numbers  in
  899.                           some report fields.
  900.  
  901.                           for Size/Relative/Interval,  the  length  of
  902.                           the interval is  now reported back properly.
  903.                           (Sample size  calculations  in  version 1.00
  904.                           were correct.)
  905.  
  906.                           some prompts rewritten for clarity.
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.         PC-SIZE                                            G.E. Dallal
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.                        DUPLICATION AND SHAREWARE NOTICES
  939.  
  940.             You  may   distribute   unmodified  copies   of   PC-SIZE:
  941.         Consultant and its documentation  provided there is no  charge
  942.         beyond a duplication fee not to exceed $5.
  943.  
  944.             PC-SIZE: Consultant is shareware.  If you find the program
  945.         to be useful,  a non-exclusive  license fee of  $15 should  be
  946.         sent to the author.  Instructors may duplicate a licensed copy
  947.         for classroom use for a fee  of $5 per student.  Students  may
  948.         keep their copies at the end of the course.
  949.  
  950.  
  951.                                REGISTRATION FORM
  952.  
  953.             Licensed from:
  954.  
  955.                   Gerard E. Dallal
  956.                   54 High Plain Road
  957.                   Andover, MA  01810
  958.  
  959.  
  960.             Date:      /   /
  961.             --------------------------------------------------------
  962.                                        Qty      Fee       Fee
  963.                      ITEM                       each      extended
  964.  
  965.  
  966.                PC-SIZE: Consultant           x  $15   =
  967.                   (license fee)       -----               --------
  968.  
  969.                   student users              x   $5   =
  970.                                       -----               --------
  971.  
  972.                 distribution disk            x   $5   =
  973.                                       -----               --------
  974.  
  975.                                              SUBTOTAL
  976.                                                           --------
  977.  
  978.                      5% Sales Tax (MA residents only)
  979.                                                           --------
  980.  
  981.  
  982.                                                 TOTAL
  983.                                                           --------
  984.  
  985.                  Please make check payable to Gerard E. Dallal
  986.  
  987.                  You may keep a copy of this invoice for your
  988.                                  tax records.
  989.  
  990.  
  991.  
  992.